package com.itheima.controller;


import com.alibaba.dubbo.config.annotation.Reference;
import com.itheima.service.TestService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Calendar;
import java.util.Date;
import java.util.List;

/**
 * @author W.J.Y
 */
@RestController
@RequestMapping("test")
public class TestController {

    @Reference(version = "1.0.0")
    private TestService testService;

    @RequestMapping("testService/{id}")
    public String testService(@PathVariable int id){
        String s = testService.testService(id);
        return s;
    }

    @RequestMapping("testException")
    public String testException(){
        int a = 1/0;
        return "";
    }



}
